#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <queue>
#include <cmath>
#include <algorithm>

#define FOR(i,a,n) for(int i=a,_n(n);i<_n;++i)
#define REP(i,n) FOR(i,0,n)

using namespace std;

int GetAns(const string& a, const string& b)
{
    int dif4,dif7;
    dif4 = dif7 = 0;
    REP(i,a.size())
    {
        if(a[i]!=b[i])
        {
            if(a[i]=='4') ++dif4;
            else ++dif7;
        }
    }
    return min(dif4,dif7) + abs(dif4-dif7);
}

int main()
{
    string sa,sb;
    while(cin>>sa>>sb)
    {
        cout<<GetAns(sa,sb)<<endl;
    }
	return 0;
}
